load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "changefeedbase",
    srcs = [
        "avro.go",
        "errors.go",
        "options.go",
        "settings.go",
        "target.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/changefeedccl/changefeedbase",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/jobs",
        "//pkg/jobs/jobspb",
        "//pkg/kv/kvpb",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/pgwire/pgcode",
        "//pkg/sql/pgwire/pgerror",
        "//pkg/util/iterutil",
        "//pkg/util/metamorphic",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "changefeedbase_test",
    srcs = [
        "errors_test.go",
        "main_test.go",
        "options_test.go",
    ],
    embed = [":changefeedbase"],
    deps = [
        "//pkg/ccl",
        "//pkg/jobs",
        "//pkg/kv/kvpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_stretchr_testify//require",
    ],
)
